const ask = (question, yes, no) => {
	if (confirm(question)) yes()
	else no()
}

ask(
	'Do you like JavaScript?',
	() => console.log('Great!'),
	() => console.log('Too bad.')
)
